﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QuestionnaireSumup.aspx.cs" Inherits="ZX.WebApp.TR.QuestionnaireSumup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <style type="text/css">
        body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width:100%; height:100%;">
            <tr>
                <td align="center" colspan="4" style="height:40px;font-weight:bold;">问卷总结</td>
            </tr>
            <tr>
                <td style="width:80px; text-align:right;">问卷名称</td>
                <td><asp:TextBox ID="txtName" runat="server" Enabled="false"></asp:TextBox></td>
                <td>发起部门</td>
                <td><asp:TextBox ID="txtBm" runat="server" Enabled="false"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width:80px; text-align:right;">开始时间</td>
                <td><asp:TextBox ID="txtSTime" runat="server" Enabled="false"></asp:TextBox></td>
                <td>结束时间</td>
                <td><asp:TextBox ID="txtETime" runat="server" Enabled="false"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width:80px; text-align:right;">问卷总结</td>
                <td colspan="3">
                    <asp:TextBox ID="txtSumup" runat="server" Height="100px" Width="470px" 
                        TextMode="MultiLine" MaxLength="190"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
<script type="text/javascript">
    function Save() {
        var QuestionnaireId = "<%=QuestionnaireId %>";
        var Sumup = document.getElementById("txtSumup").value;
        if (Sumup == "") {
            alert("总结内容不能为空!");
        } else {
            var url = "../Extend/AjaxData/DataProcessin.aspx?action=Update&entity=TrQuestionnaire&id=" + QuestionnaireId + "&sumup=" + encodeURI(Sumup);
            YAHOO.util.Connect.asyncRequest('POST', url, {
                success: function (res) {
                    var inventory;
                    try {
                        inventory = res.responseText;
                        if (inventory == 1) {
                            alert("保存成功!");
                            parent.closeWin();
                        } else {
                            alert(inventory + "\n" + "保存失败!");
                        }
                    }
                    catch (e) {
                    }
                    finally {
                    }
                },
                failure: function (error) {
                    alert("读取菜单数据错误：" + error.statusText);
                }
            }, null);
        }
    }
</script>
</html>
